package com.cy.pj.sys.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SysUserRoleDao {

    int deleteObjectsByRoleId(Integer roleId);

    int insertObjects(
            @Param("userId")Integer userId,
            @Param("roleIds")Integer[] roleIds);

    List<Integer> findRoleIdsByUserId(Integer id);

    int deleteObjectsByUserId(Integer userId);

    //@Select("select role_id from sys_user_roles where user_id=#{userId}")
    //List<Integer> findRoleIdsByUserId(Integer id);
}
